﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Media.Media3D;
using HelixToolkit.Wpf;

namespace PDBSmart
{
    public enum AtomType
    {
        N = 1,
        ND1,
        ND2,
        NE,
        NE1,
        NE2,
        NZ,
        NH1,
        NH2,
        C ,
        CA,
        CB,
        CG,
        CG1,
        CG2,
        CD,
        CD1,
        CD2,
        CE,
        CE1,
        CE2,
        CE3,
        CZ,
        CZ2,
        CZ3,
        CH2,
        O,
        OG,
        OG1,
        OD1,
        OD2,
        OE1,
        OE2,
        OH,
        OXT,
        SD,
        SG
    }

    public enum NType
    {
        N = 1,
        ND1,
        ND2,
        NE,
        NE1,
        NE2,
        NZ,
        NH1,
        NH2,
    }

    public enum CType
    {
        C = 1,
        CA,
        CB,
        CG,
        CG1,
        CG2,
        CD,
        CD1,
        CD2,
        CE,
        CE1,
        CE2,
        CE3,
        CZ,
        CZ2
    }

    public enum OType
    {
        O = 1,
        OG,
        OG1,
        OD1,
        OD2,
        OE1,
        OE2,
        OH,
        OXT,
    }

    public enum AminoType
    {
        CYS = 1,
        THR,
        ARG,
        PRO,
        ASN,
        LYS,
        SER,
        LEU,
        ILE,
        HIS,
        GLY,
        ALA,
        PHE,
        TYR,
        GLN,
        GLU,
        ASP,
        VAL,
        MET,
        TRP,
    }

    public static class Utils
    {
        public static Material GetColorByAtomType(AtomType atomType)
        {
            if (atomType.ToString().StartsWith("N"))
                return Materials.Blue;
            if (atomType.ToString().StartsWith("C"))
                return Materials.Gray;
            if (atomType.ToString().StartsWith("S"))
                return Materials.Yellow;
            if (atomType.ToString().StartsWith("O"))
                return Materials.Red;
            return Materials.Gray;
        }
    }
}
